{% extends "mapp/base.html" %}

{% block head %}
{% if state == "pending" or state == "no files"%}
<meta http-equiv="refresh" content="10" >
{% endif %}
{% endblock %}


{% block header %} MAPP query detail {% endblock %}

{% block content %}
	<section id="detail">
		<h3>ID:</h3>
		<p>{{ query_id }}</p>
			<h3>State:</h3>
			{% if state == "completed" %}
				<p><strong>Completed</strong> - go to <a href="{% url 'mapp:result' query_id %}">results</a>.</p>
			{% elif state == "pending" %}
				<p>Analysis is <strong>in progress</strong>.</p>
				<p>It takes about 17min with default settings.</p>
				<p>You can save url of this page for later checking.</p>
				<p>The results will be shown automatically after completing the calculation. </p>
			{% elif state == "no files" %}
				<p>Anlysis is just in queue or is too old. No files were found.</p>
			{% elif state == "not exists" %}
				<p>Anlysis never existed or is really too old.</p>
			{% else %}
				<p>Undefined state: {{ state }}</p>
			{% endif %}
			{% if query %}
				<h3>Date:</h3>
				<p>{{ query.date }}</p>				
			{% endif %}
	</section>
{% endblock %}